<?php

namespace STAGE\StageBundle\Entity;

use Doctrine\ORM\Mapping as ORM;

/**
 *  StagePersonne
 *
 * @ORM\Table()
 * @ORM\Entity(repositoryClass="STAGE\StageBundle\Entity\StagePersonneRepository")
 */
class  StagePersonne
{
    /**
     * @var integer
     *
     * @ORM\Column(name="id", type="integer")
     * @ORM\Id
     * @ORM\GeneratedValue(strategy="AUTO")
     */
    private $id;

    /**
     * @var string
     *
     * @ORM\Column(name="role", type="string", length=255)
     */
    private $role;
    /**
     *
     * @ORM\ManyToOne(targetEntity="STAGE\StageBundle\Entity\Stage",inversedBy="enseignants")
     */
    private $stage;
    /**
     *
     * @ORM\ManyToOne(targetEntity="STAGE\UserBundle\Entity\User",inversedBy="stages")
     */
    private $user;

    /**
     * Get id
     *
     * @return integer 
     */
    public function getId()
    {
        return $this->id;
    }

    /**
     * Set role
     *
     * @param string $role
     * @return  StagePersonne
     */
    public function setRole($role)
    {
        $this->role = $role;

        return $this;
    }

    /**
     * Get role
     *
     * @return string 
     */
    public function getRole()
    {
        return $this->role;
    }

    /**
     * Set stage
     *
     * @param \STAGE\StageBundle\Entity\Stage $stage
     * @return StagePersonne
     */
    public function setStage(\STAGE\StageBundle\Entity\Stage $stage = null)
    {
        $this->stage = $stage;

        return $this;
    }

    /**
     * Get stage
     *
     * @return \STAGE\StageBundle\Entity\Stage 
     */
    public function getStage()
    {
        return $this->stage;
    }

    /**
     * Set user
     *
     * @param \STAGE\UserBundle\Entity\User $user
     * @return StagePersonne
     */
    public function setUser(\STAGE\UserBundle\Entity\User $user = null)
    {
        $this->user = $user;

        return $this;
    }

    /**
     * Get user
     *
     * @return \STAGE\UserBundle\Entity\User 
     */
    public function getUser()
    {
        return $this->user;
    }
}
